package com.lap.auth.application.authorization.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import lombok.Data;

@Data
@Schema(description = "菜单展示数据传输返回")
public class MenuViewDto {

  @Schema(description = "唯一标识")
  private Integer id;

  @Schema(description = "父ID")
  private Integer parentId;

  @Schema(description = "路由名称")
  private String name;

  @Schema(description = "路由路径")
  private String path;

  @Schema(description = "路由组件")
  private String component;

  @Schema(description = "路由定向")
  private String redirect;

  @Schema(description = "菜单元件")
  private MetaViewDto meta;

  @Schema(description = "子菜单")
  private List<MenuViewDto> children;

  @Data
  @Schema(description = "元件数据传输")
  public static class MetaViewDto {

    @Schema(description = "菜单名称")
    private String title;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "向右图标")
    private String extraIcon;

    @Schema(description = "进场动画")
    private String enterTransition;

    @Schema(description = "离场动画")
    private String leaveTransition;

    @Schema(description = "菜单激活")
    private String activePath;

    @Schema(description = "Iframe链接")
    private String frameSrc;

    @Schema(description = "Iframe加载动画")
    private boolean frameLoading;

    @Schema(description = "显示菜单")
    private boolean showLink;

    @Schema(description = "显示父菜单")
    private boolean showParent;

    @Schema(description = "缓存页面")
    private boolean keepAlive;

    @Schema(description = "标签页面")
    private boolean hiddenTag;

    @Schema(description = "固定标签页")
    private boolean fixedTag;

    @Schema(description = "路由排序")
    private Integer rank;
  }
}
